<%@page import="com.bf.entity.Dep"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'showAdd.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="admin/resource/css/wzgl.css" />
    <link rel="stylesheet" type="text/css" href="admin/resource/css/global.css" />
    <link rel="stylesheet" type="text/css" href="admin/resource/css/ligerui-dialog.css" />
	<script src="admin/resource/js/jquery-1.3.2.min.js" type="text/javascript"></script>
	<script src="admin/resource/js/ligerDialog.js" type="text/javascript"></script>
	<script type="text/javascript">
	function t_open(img) {
		  $.ligerDialog.open({
		    width:300,
		    height:300,
		    title:'员工当前照片',
		    url:'admin/page/org/empinfo/showImg.jsp?img='+img,
		    buttons: [{ text: '确定', onclick: function (item, dialog) { dialog.close();}}]
		  });
		}
	</script>	
  </head>
  
  <body class="body">
   <div class="w_100 title_all box"><div class="return"><a href="javascript:history.back(-1)">返回</a></div></div>
	<div class="w_100 right_all center box">
		<!--修改员工-->
		<div class="right_lm_xglm box">
			<form action="emp/emp_update.action" method="post" id="f1" enctype="multipart/form-data"> 
				<input type="hidden" name="id" value="${emp.id}">
				<ul>
					<li><span>员工姓名：</span><input type="text" name="emp.empName" id="orgName" value="${emp.empName}"/>
					</li>
					<li><span>员工电话：</span><input type="text" name="emp.empTel" id="orgCode" value="${emp.empTel}"/>
					</li>
					<li><span>员工地址：</span><input type="text" name="emp.address" id="orgCode" value="${emp.address}"/>
					</li>
					<li><span>员工部门：</span>
					<select name="did">
					  <option value="${emp.dep.id}">${emp.dep.depName}</option>
					  <% 
					  List<Dep> deps = (List<Dep>)request.getAttribute("deps");
					  for(Dep dep : deps) {
					    %>
					     <option value="<%=dep.getId()%>">---<%=dep.getDepName()%>---</option>
					    <% 
					    if(dep.getChildren().size()>0) {
					      for(Dep d_dep : dep.getChildren()) {
					        %>
					         <option value="<%=d_dep.getId()%>">------<%=d_dep.getDepName()%>------</option>
					        <% 
					      }
					    }
					  }
					  %>
					</select>
					</li>
					<li><span>员工照片：</span><input type="text" name="emp.empImg" id="empImg" value="${emp.empImg}"/>
					<input type="button" value="查看" class="cklmt" onclick="javascript:void(t_open('${emp.empImg}'))"/>
					</li>
					<li><span>照片修改：</span><input type="file" name="image" id="upImage"/>
					</li>
				</ul>
			<div class="xgnr_sub">
				<input type="reset" value="重置" /> <input type="submit" value="提交"/>
			</div>
			</form>
		</div>
	</div>
</body>
</html>
